﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.IO;

namespace SoftwareMonkeys.LogClimber.Business
{
    public class XmlSaver
    {
        public void Save(object obj, string path)
        {
            using (StreamWriter writer = File.CreateText(path))
            {
                XmlSerializer serializer = new XmlSerializer(obj.GetType());
                serializer.Serialize(writer, obj);
                writer.Close();
            }
        }
    }
}
